home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_1.lha / 8_1 / 8_1c.c < prev    next >
Text File  |  1993-08-08  |  428b  |  25 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include "8_1a.c"        // EXPAND
  6. include <error.h>
  7. ain(int, char**)
  8.  
  9.    for (;;)
  10. {
  11. double a, b;
  12. if (!(cin >> a >> b))
  13.     break;
  14. complex c(a,b);
  15. if (!(cout << c))
  16.     break;
  17. }
  18.  
  19.    if (!cin.eof())
  20. error("error reading input");
  21.    if (cout.bad())
  22. error("error writing output");
  23.    return 0;
  24.  
  25.